Micron Document
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------
| SparkN0de-git | SparkN0de |
--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------


Commit d03f32df1afb86631ffecf5f89ac92c147255f62


Parents : e848f32
Author : Ivan <ivan@quad4.io>
Signature : Signature validation error
Date : 2026-04-07T15:47:55-05:00

refactor(build-backend): simplify removal of Python bytecode artifacts by directly unlinking files without sibling check

Changes

1 files changed, 1 insertions(+), 5 deletions(-)


Diff

diff --git a/scripts/build-backend.js b/scripts/build-backend.js
index e121953f..b7ea5d32 100755
--- a/scripts/build-backend.js
+++ b/scripts/build-backend.js
@@ -30,11 +30,7 @@ function stripPythonBytecodeArtifacts(dir) {
stripPythonBytecodeArtifacts(full);
}
} else if (ent.name.endsWith(".pyc") || ent.name.endsWith(".pyo")) {
- const stem = ent.name.replace(/\.pyc$/i, "").replace(/\.pyo$/i, "");
- const siblingPy = path.join(dir, `${stem}.py`);
- if (fs.existsSync(siblingPy)) {
- fs.unlinkSync(full);
- }
+ fs.unlinkSync(full);
}
}
}


──────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────────